package May;

import java.util.Scanner;

public class Test09Sleep {
    public static void main(String[] args) throws InterruptedException {
        Scanner sc = new Scanner(System.in);

        for (int i = 0; i <= 10; i++) {
            Thread.sleep(600);
            System.out.println("请输入一个数字，我将判断他是否含有数字7或者是其倍数");
            int temp = sc.nextInt();
            if (temp % 10 == 7 || temp / 10 % 10 == 7 || temp % 7 == 0) {
                if (temp % 10 == 7 && temp % 7 != 0) {
                    System.out.println("该数字是包含7的数");
                } else if (temp / 10 % 10 == 7 && temp % 7 != 0) {
                    System.out.println("该数字是包含7的数");
                } else if (temp % 7 == 0) {
                    System.out.println("该数字是7的倍数");
                }
            } else {
                Thread.sleep(600);
                System.out.println("您输了一个和7无关的数字");
            }
        }
    }
}
